MarginItemDecoration
class MarginItemDecoration(marginVertical: Int, marginHorizontal: Int) : RecyclerView.ItemDecoration
ItemDecoration that applies a specified margin to the items. Use this instead of manually adding a margin to the item's layout.
Parameters
marginVertical
Int value for the desired vertical margin used as item offset
marginHorizontal
Int value for the desired horizontal margin used as item offset
Functions
Link copied to clipboard
open override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State)